package com.example.springboot_demo.pojo;


import java.io.Serializable;
import java.util.List;

//@Data
//@AllArgsConstructor
//@NoArgsConstructor
public class Page<T> implements Serializable {
    //默认长度
    private static int page_size = 4;

    //页码
    private int pageNo;

    //总记录数
    private int pageTotal;

    //总页码数
    private int pageCnt;

    //该页面的所有T
    private List<T> item;

    //页面显示的数量
    private int pageSize = page_size;
    //需要查询T的名字
    private String queryName;


    public Page() {
    }

    public Page(int pageNo, int pageTotal, int pageCnt, List<T> item, int pageSize, String queryName) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageCnt = pageCnt;
        this.item = item;
        this.pageSize = pageSize;
        this.queryName = queryName;
    }

    public static int getPage_size() {
        return page_size;
    }

    public static void setPage_size(int page_size) {
        Page.page_size = page_size;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public int getPageCnt() {
        return pageCnt;
    }

    public void setPageCnt(int pageCnt) {
        this.pageCnt = pageCnt;
    }

    public List<T> getItem() {
        return item;
    }

    public void setItem(List<T> item) {
        this.item = item;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getQueryName() {
        return queryName;
    }

    public void setQueryName(String queryName) {
        this.queryName = queryName;
    }
}
